package com.zheng.shop.rpc.api;

import com.alibaba.fastjson.JSONObject;
import com.zheng.common.base.BaseService;
import com.zheng.shop.common.exception.ShopException;
import com.zheng.shop.dao.model.ShopProduct;

import java.util.List;
import java.util.Map;

/**
 * ShopProductService接口
 * Created by shuzheng on 2017/11/7.
 */
public interface ShopProductService extends BaseService<ShopProduct> {
    List<Map<String, Object>> selectProductMapList(String search, String sort, String order, int offset, int limit, Integer categoryId);

    int selectProductCount(String search, String sort, String order, int offset, int limit, Integer categoryId);

    boolean createProduct(JSONObject param) throws ShopException;

    boolean updateProduct(JSONObject param) throws ShopException;

    boolean deleteProduct();

    Map<String, Object> selectProduct(Integer productId);
}